fix(autopilot): harden Repo2 deployment configuration and execution - #278
fix(autopilot): harden Repo2 deployment configuration and execution#278gmuslia wants to merge 3 commits into
Conversation
| ' (cd .cdk-cicd-target && ../node_modules/.bin/cdk-cicd deploy --from-image ' + | ||
| '--target "$TARGET_STAGE" --yes)', | ||
| ' else', | ||
| ' npx cdk-cicd deploy --from-image --target "$TARGET_STAGE" --yes', |
There was a problem hiding this comment.
🔴 The new normal Repo2 deployment path invokes the CLI through npx.
npx cdk-cicd deploy --from-image --target "$TARGET_STAGE" --yesIf the local executable cannot resolve, npx can resolve a registry version at deploy time. That makes the deployed CLI version non-deterministic and diverges from the parallel-region branch immediately above, which uses the installed local executable.
Suggestion: define and invoke the project's pinned cdk-cicd npm script (npm run cdk-cicd -- deploy ...) in both branches, so a missing dependency fails deterministically rather than being fetched during deployment.
There was a problem hiding this comment.
Fixed. Both normal and parallel Repo 2 deployment paths now invoke the lockfile-installed CLI through npm run cdk-cicd -- deploy .... The parallel path generates a scoped npm script that preserves its narrowed working directory. Tests also assert that no npx fallback remains.
Description
Fixes 17 Autopilot and Repo2 findings identified when reviewing changes against commit dd60a96.
Changes
Testing
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license.